﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;

namespace HTComics.Web.Common
{
    public class PriceGuideCollection : CollectionBase 
    {
        public PriceGuideCollection()
        {
        }

        public PriceGuide this[int bandId, int conditionId]
        {
            get 
            {
                PriceGuide priceGuide = null;
                for (int i = 0; i <= this.InnerList.Count - 1; i++)
                {
                    if (((PriceGuide)this.InnerList[i]).BandId == bandId && ((PriceGuide)this.InnerList[i]).ConditionId == conditionId)
                    {
                        priceGuide = (PriceGuide)this.InnerList[i];
                        break;
                    }
                }
                return priceGuide; 
            }
        }

        public void Add(PriceGuide priceGuide)
        {
            this.InnerList.Add(priceGuide);
        }
    }

    public class PriceGuide
    {
        public int ConditionId { get; set; }
        public int BandId { get; set; }
        public int? ConditionId_2 { get; set; }
        public double? Factor { get; set; }
        public double? VarA { get; set; }
        public double? VarB { get; set; }
    }
}